<template>
<ul class="todo-main">
<!--  :msg="todoObj" v-for="todoObj in msg" todo :key="todoObj.id"-->
<!--将数据传递给子组件-->
  <my-item :todos="todoObj"
           v-for="todoObj in todos"
           :key="todoObj.id"
           :checkTodo="checkTodo"
           :deleteObj="deleteObj"
  />
</ul>

</template>

<script>
import MyItem from "../components/MyItem";
export default {
  name: "MyList",
  components: {
    MyItem,
  },
  //接收父组件传递过来的数据
  props:['todos','checkTodo','deleteObj']
}
</script>

<style>
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

</style>